<template>
  <div class="ranking-member-item">
      <title-bar :bar-title="values.name" :more="true" :link="getLink()"></title-bar>
      <text-grid>
        <grid-item><label slot="label">目标</label><span slot="value">{{ values.target_sum | moneyFormate }}元</span></grid-item>
        <grid-item><label slot="label">成交</label><span slot="value">{{ values.cheng_jiao_sum | moneyFormate }}元</span></grid-item>
        <grid-item><label slot="label">预测</label><span slot="value">{{ values.prediction_sum | moneyFormate }}元</span></grid-item>
        <grid-item><label slot="label">完成</label><span slot="value">{{ values.proportion || 0 }}%</span></grid-item>
      </text-grid>
    </div>
</template>
<script>
import TitleBar from '../title-bar'
import TextGrid from '../TextGrid/grid'
import GridItem from '../TextGrid/grid-item'

export default {
  props: {
    values: {
      type: Object,
      default: function () {
        return {
          target_sum: 0,
          cheng_jiao_sum: 0,
          proportion: 0,
          prediction_sum: 0
        }
      }
    },
    time: {
      type: String | Number
    }
  },
  data () {
    return {
      barTitle: '我的目标',
      data: [],
      morePath: ''
    }
  },
  components: {
    TitleBar,
    TextGrid,
    GridItem
  },
  methods: {
    getLink (team) {
      return  {
        name: 'member-profile',
        query: {
          suid: this.values.suid,
          time: this.time,
          title: this.values.name,
          id: this.$route.query.team_id
        }
      }
    }
  },
  mounted () {

  }
}
</script>
<style lang="less">
.ranking-member-item {
  background-color: white;
}
</style>
